const path = require('path');

module.exports = {
    entry: {
		page1:  path.resolve(__dirname, './src/index1.js'),
		page2:  path.resolve(__dirname, './src/index2.js'),
	},
	// 提取公共代码
	optimization: {
	    splitChunks: {
	        cacheGroups: {
	            default: {
	                name: 'common',
	                chunks: 'initial'
	            }
	        }
	    }
	}
};